#if !defined(AFX_MEGABUTTON_H__8CE208D0_6B00_4D23_9197_8D75C47F5C4E__INCLUDED_)
#define AFX_MEGABUTTON_H__8CE208D0_6B00_4D23_9197_8D75C47F5C4E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MegaButton.h : header file
//

#include "MegaBitmap.h"

/////////////////////////////////////////////////////////////////////////////
// CMegaButton window
enum MBType
{
	MBT_PUSH, 
	MBT_CHECK, 
	MBT_RADIO
};

enum MBCheckState
{
	MBS_CHECK, 
	MBS_UNCHECK
};


class CMegaButton : public CButton
{
// Construction
public:
	CMegaButton();

// Attributes
public:

// Operations
public:
	void GetSize(LPRECT prect);
	void SetCheck(MBCheckState nState);
	MBCheckState GetCheck();


protected:
	CMegaBitmap *m_pOutBmp, *m_pDownBmp, *m_pOverBmp;
	CMegaBitmap *m_pCheckOutBmp, *m_pCheckDownBmp, *m_pCheckOverBmp;
	CMegaBitmap *m_pDisabledBmp;

	MBType m_nType;
	MBCheckState m_nCheckState;

	bool m_bMouseOver;
	bool m_bLButtonDown;

	CDC m_dcBack;
	CMegaBitmap m_BackBmp;
	CGdiObject * m_pOldBackBmp;

	HRGN m_hrgn;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMegaButton)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMegaButton();

	void SetBitmaps(UINT uiOut, UINT uiDown, UINT uiOver, UINT uiDisabled=NULL);
	void SetBitmaps(UINT uiCheckOut, UINT uiCheckDown, UINT uiCheckOver, 
					UINT uiOut, UINT uiDown, UINT uiOver, UINT uiDisabled=NULL);

	void SetBackgroundBmp(CMegaBitmap * pBack);

	// Generated message map functions
protected:
	//{{AFX_MSG(CMegaButton)
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnCaptureChanged(CWnd *pWnd);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MEGABUTTON_H__8CE208D0_6B00_4D23_9197_8D75C47F5C4E__INCLUDED_)
